package com.qf.bank.utils;

import lombok.extern.slf4j.Slf4j;

/**
 * @author YaoJiXing
 * created 2022/11/23 17:28
 */
@Slf4j
public class StringUtils {

    public static boolean isNotEmpty(String... strs) {
        for (String str : strs) {
            if (str == null || str.trim().length() == 0) {
                return false;
            }
        }
        return true;
    }

    public static Integer str2num(String num) {
        try {
            return Integer.valueOf(num);
        } catch (NumberFormatException e) {
            log.error("[java.lang.NumberFormatException] - " + num);
        }
        return -1;
    }

}
